const users = {
  namespaced: true,
  state: {
    activePath: '/',
    isCollapse: true,
    pwd: false
  },
  getters: {
    getCollapse (state) {
      return state.isCollapse
    },
    getActivePath (state) {
      return state.activePath
    },
  },
  mutations: {
    SET_NAV_COLLAPSE(state, payload) {
      state.isCollapse = payload
    },
    SET_ACTIVE_PATH(state, payload) {
      state.activePath = payload
    },
    SET_PWD(state, payload) {
      state.pwd = payload
    }
  },
  actions: {
    setCollapse({commit}, data) {
      commit('SET_NAV_COLLAPSE', data);
    },
    setActivePath({commit}, data) {
      commit('SET_ACTIVE_PATH', data);
    },
    setFirstAdminPassword({ commit }, data) {
      commit('SET_PWD', data)
    }
  }
}
export default users